<?php
//include_once "../qc_base.php";
//include_once "../qc_utils.php";
//include_once "../bootstrap.php";
//include_once "../lib/phpctls/PhpCtls.php";


	$q = Doctrine_Query::create()
	->from('Crudsets cs')->Where('project_id = ?',$project_id);
	$ar_crudsets = $q->execute()->toArray();	

	
	$ar_selections = array(array('showvalue'=>'Select CRUD Set','keyvalue'=>''));
	
	
	foreach($ar_crudsets AS $ar_crudset){
		$ar_selection['showvalue'] = $ar_crudset['cs_name'];
		$ar_selection['keyvalue'] = $ar_crudset['crudset_id'];
		$ar_selections[] = $ar_selection;
	}
	
	
$ctl_SelectCrudset = new CtlSelect(array('name'=>'crudset_id', 'id'=>'crudset_id', 'set_on_change'=>'this.form.submit()'),
$crudset_id, $ar_selections);

print "<h4 class='paramhead' >CRUDset Is</h3>";
print $ctl_SelectCrudset->render();
	
if(!empty($arParameters['crudset_id'])){
	$arSubMenu = sort($arMenuGroups['crudset_id']);
	foreach($arMenuGroups['crudset_id'] as $link){
		print $link;
	}
print "<li><a href='fieldspecs/fieldspecs_ctl.php?crudset_id=$crudset_id' target='mainframe'>View Fieldspecs</a></li>";	
		print "<li><a href='filters/filters_ctl.php?crudset_id=$crudset_id' target='mainframe'>View Filters</a></li>";	

		}	
?>
